package com.zy.test.store;

import android.content.Intent;
import android.widget.Toast;

import androidx.annotation.NonNull;

import com.zy.activity.BaseMenuActivity;
import com.zy.activity.bean.BaseMenuBean;

import java.util.ArrayList;

public class StoreMainListActivity extends BaseMenuActivity {

    private final String TAG = "StoreMainListActivity";


    @Override
    protected void clickItem(BaseMenuBean bean) {
        if (bean.getCode() == 1) {
            startActivity(new Intent(this, MMKVDemoActivity.class));
        } else {
            Toast.makeText(this, "待更新", Toast.LENGTH_LONG).show();
        }
    }

    @Override
    protected void init(@NonNull ArrayList<BaseMenuBean> list) {
        list.add(new BaseMenuBean("存储"));
        list.add(new BaseMenuBean("MMKV", 1));
        list.add(new BaseMenuBean("SP", 2));
        list.add(new BaseMenuBean("数据库", 3));
    }
}